package com.hhkj.study.admin.resource.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.valid.VAdd;
import com.ruoyi.common.valid.VDisable;
import com.ruoyi.common.valid.VPage;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@TableName(value = "x_resource_course_offline")
@EqualsAndHashCode(callSuper = true)
@Data
public class ResourceCourseOffline extends ResourceCourseBase {

	/**
	 * 名称
	*/
	@NotBlank(message = "名称不能为空", groups = VAdd.class)
	private String name;
	/**
	 * 课程小类,字典表中id
	*/
	@NotNull(message = "课程小类不能为空", groups = VAdd.class)
	private Long courseType;
	/**
	 * 资料id,关联x_resource_course_doc表中id
	*/
	private Long docId;
	/**
	 * 题库id,关联x_resource_question_bank表中id
	*/
	private Long bankId;
	/**
	 * 年份
	*/
	private String year;
	/**
	 * 讲师id,关联x_teacher表中id
	*/
	@NotNull(message = "讲师id不能为空", groups = VAdd.class)
	private Long teacherId;
	/**
	 * 开始时间
	*/
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date startTime;
	/**
	 * 结束时间
	*/
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endTime;
	/**
	 * 说明
	*/
	private String remark;
	/**
	 * 是否展示（0-上架， 1-下架）
	*/
	@NotNull(message = "上下架状态不能为空", groups = {VAdd.class, VDisable.class})
	private Integer publishedFlag;
	/**
	 * 排序序号
	*/
	private Integer orderNum;

	@TableField(exist = false)
	private Long type;
}